package com.gqb.threadWait;

import java.util.concurrent.Callable;

public class NewThreadTask implements Callable<Integer> {
	private Object swtich;
	private ThreadGroup threadGroup;
	private String name;
	public NewThreadTask(Object swtich) {
		super();
		this.swtich = swtich;
	}

	public NewThreadTask(ThreadGroup threadGroup, String i) {
		this.threadGroup=threadGroup;
		this.name=i+"";
	}
	
	@Override
	public Integer call() {
		for (int i = 0; i < 5; i++) {
			PrimaryTask primaryTask=new PrimaryTask(this.threadGroup,i);
			primaryTask.start();
		}
		return 5;
	}

}
